

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta name="layout" content="main" />
    <title>Show User</title>
  </head>
  <body>
    <g:render template="/menu" />
    <div class="body">
      <h1>Show User</h1>
      <g:if test="${flash.message}">
        <div class="message">${flash.message}</div>
      </g:if>
      <div class="dialog">

        <table>
          <tbody>

          <td valign="top" class="value">
            <img alt="WTF" src="${createLink(controller:'user', action:'avatar_image', id:userInstance?.id)}"  />
          </td>

          <tr class="prop">
            <td valign="top" class="name">Id:</td>

            <td valign="top" class="value">${fieldValue(bean:userInstance, field:'id')}</td>

          </tr>

          <tr class="prop">
            <td valign="top" class="name">User Name:</td>

            <td valign="top" class="value">${fieldValue(bean:userInstance, field:'userName')}</td>

          </tr>

          <tr class="prop">
            <td valign="top" class="name">Pass Word:</td>

            <td valign="top" class="value">${fieldValue(bean:userInstance, field:'passWord')}</td>

          </tr>

          <tr class="prop">
            <td valign="top" class="name">Date Of Birth:</td>

            <td valign="top" class="value">${fieldValue(bean:userInstance, field:'dateOfBirth')}</td>

          </tr>

          <tr class="prop">
            <td valign="top" class="name">
              <label for="callDetails">Call Details:</label>
            </td>
            <td valign="top" class="value ${hasErrors(bean:userInstance,field:'callDetails','errors')}">

              <ul>
                <g:each var="c" in="${userInstance?.callDetails?}">
                  <li><g:link controller="callDetail" action="show" id="${c.id}">${c?.encodeAsHTML()}</g:link></li>
                </g:each>
              </ul>
          <g:link controller="callDetail" params="['user.id':userInstance?.id]" action="create">Add CallDetail</g:link>


          </tbody>
        </table>
      </div>
      <div class="buttons">
        <g:form>
          <input type="hidden" name="id" value="${userInstance?.id}" />
          <span class="button"><g:actionSubmit class="edit" value="Edit" /></span>
          <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
        </g:form>
      </div>
    </div>
  </body>
</html>
